package com.chen.blue.service.system;

import com.chen.blue.domain.delete.system.MenuRoleDelete;
import com.chen.blue.domain.delete.system.UserRoleDelete;
import com.chen.blue.domain.dto.system.MenuRoleDto;
import com.chen.blue.domain.dto.system.UserRoleDto;
import com.chen.blue.domain.dto.system.update.MenuRoleDtoEdit;
import com.chen.blue.domain.dto.system.update.UserRoleDtoEdit;
import com.chen.blue.domain.model.system.MenuRoleModel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chen.blue.domain.vo.system.MenuRoleVo;
import com.chen.blue.exception.e.DtoNullException;
import com.chen.blue.result.DataResult;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author CLT
 * @since 2024-05-09
 */
public interface IMenuRoleService extends IService<MenuRoleModel> {

    /**
     * 角色菜单的初次添加
     *
     * @param menuRoleDtoList
     * @return
     * @throws DtoNullException
     */
    boolean addRoleMenu(List<MenuRoleDto> menuRoleDtoList) throws DtoNullException;

    /**
     * 删除角色拥有的菜单
     *
     * @param menuRoleDelete
     * @return
     */
    boolean deleteRoleMenu(MenuRoleDelete menuRoleDelete) throws DtoNullException;

    /**
     * 角色菜单的修改
     *
     * @param menuRoleDtoEditList
     * @return
     * @throws DtoNullException
     */
    boolean updateRoleMenu(List<MenuRoleDtoEdit> menuRoleDtoEditList) throws DtoNullException;

    /**
     * 根据角色ID查询所有菜单
     *
     * @param roleId
     * @return
     * @throws DtoNullException
     */
    DataResult<Map<String, Object>> queryMenuById(Long roleId) throws DtoNullException;

    /**
     * 根据角色ID查询相关联菜单
     *
     * @param roleIds
     * @return
     * @throws DtoNullException
     */
    DataResult<List<Long>> queryMenuIdsByIds(List<Long> roleIds) throws DtoNullException;

}
